package com.airline.form;


import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.LabelValueBean;
import org.apache.struts.validator.ValidatorForm;

import com.airline.beans.Customer;


public class CreateCustomerForm extends ValidatorForm{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	Customer cust = null;
	ArrayList stateList = new ArrayList();
	

	public CreateCustomerForm() {
		cust = new Customer();
		stateList.add(new LabelValueBean("CA","CA"));
		stateList.add(new LabelValueBean("MI","MI"));
		stateList.add(new LabelValueBean("KS","KS"));
		stateList.add(new LabelValueBean("UT","UT"));
		stateList.add(new LabelValueBean("MO","MO"));
		stateList.add(new LabelValueBean("TN","TN"));
	}
	public ArrayList getStateList() {
		return stateList;
	}
	public void setStateList(ArrayList stateList) {
		this.stateList = stateList;
	}
	public Customer getCust() {
		return cust;
	}

	public void setCust(Customer cust) {
		this.cust = cust;
	}

	String error = null;
	
	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}
	
	@Override
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		request.getSession().getAttributeNames();
		super.reset(mapping, request);
	}

	

}
